export function applyMixins(derivedCtor: any, baseCtors: any[]) {
    for (let i = 0; i < baseCtors.length; i++) {
        let baseCtor = baseCtors[i];
        const propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype);
        for (let j = 0; j < propertyKeys.length; j++) {
            let propertyKey = propertyKeys[j];
            if (propertyKey == 'constructor') { }
            else {
                let getterFunc = baseCtor.prototype.__lookupGetter__(propertyKey);
                let setterFunc = baseCtor.prototype.__lookupSetter__(propertyKey);
                if (getterFunc) {
                    derivedCtor.prototype.__defineGetter__(propertyKey, getterFunc);
                } else if (setterFunc) {
                    derivedCtor.prototype.__defineSetter__(propertyKey, setterFunc);
                } else {
                    derivedCtor.prototype[propertyKey] = baseCtor.prototype[propertyKey];
                }
            }
        }
    }
}